/** 
* Copyright (C) 2012-2017 ZEEI Inc.All Rights Reserved.
* 项目名称：efs
* 文件名称：AlarmCodeController.java
* 包  名  称：com.zeei.efs.controller
* 文件描述：TODO 请修改文件描述
* 创建日期：2017年6月8日下午1:47:43
* 
* 修改历史
* 1.0 chenhuiqiong 2017年6月8日下午1:47:43 创建文件
*
*/


package com.zeei.app.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zeei.app.service.MaterialsInfoService;
import com.zeei.app.vo.FuelVO;
import com.zeei.app.vo.MaterialsInfoVO;
import com.zeei.app.vo.QueryParamVO;
import com.zeei.common.annotation.SysLog;
import com.zeei.common.controller.BasicController;
import com.zeei.common.enums.LogType;
import com.zeei.common.vo.PageParamVO;
import com.zeei.common.vo.ResultDataVO;


/**
 * 
* @类型名称：MaterialsInfoFuelController
* @类型描述：原辅材料及燃料
* @功能描述：原辅材料及燃料
* @创建作者：chenhuiqiong
*
 */
@Controller
@RequestMapping("/app/materialsInfoFuel")
public class MaterialsInfoFuelController extends BasicController{
	@Autowired
	private MaterialsInfoService materialsInfoService;
	
	@RequestMapping(value = "/list", method = RequestMethod.POST)
	@ResponseBody
	@SysLog(text = "查询原辅材料及燃料", type = LogType.View)
	public ResultDataVO<Map<String,Object>> queryAppVersion(QueryParamVO queryParamVO, PageParamVO pageParam){
		Map<String,Object> map = new HashMap<String,Object>();
		
		
		MaterialsInfoVO materialsInfoVO = new MaterialsInfoVO();
		materialsInfoVO.setPsCode(queryParamVO.getPsCode());
		List<MaterialsInfoVO> materialsInfoList = materialsInfoService.queryMaterialsInfo(materialsInfoVO, pageParam, false).getList();
		map.put("materialsInfoList", materialsInfoList);
		
		FuelVO fuelVO = new FuelVO();
		fuelVO.setPsCode(queryParamVO.getPsCode());
		List<FuelVO> fuelList = materialsInfoService.queryFuel(fuelVO, pageParam, false).getList();
		map.put("fuelList", fuelList);
		
		return createResultDataVO(map, true, "");
	}
	
}

